using FileManager.Models;
using FileManager.Services;
using FileManager.ViewModels;
using System.Windows;

using System.Windows.Media.Imaging;
namespace FileManager.Views
{
    public partial class ImageViewerWindow : Window
    {
        public ImageViewerWindow(FileItem file, BitmapImage image)
        {
            InitializeComponent();
            
            // 初始化服务
            var dbContext = new AppDbContext();
            var datFileDecryptor = new DatFileDecryptor();
            var fileManagerService = new FileManagerService(dbContext);
            
            // 设置视图模型
            var viewModel = new ImageViewerViewModel(file, image);
            DataContext = viewModel;
        }
    }
}